import fetch from 'common/src/utils/fetch';

export function findFaculty(language) {
    let authId = localStorage.getItem('activeAuthId');
    if (authId) {
        return fetch({
            url: '/api/userservice/dept/findDepartmentByAuthId' + (language ? `?language=language&authId=${authId}` : `?authId=${authId}`),
            method: 'get',
        });
    } else {
        return fetch({
            url: '/api/userservice/dept/findDepartment' + (language ? '?language=' + language : ''),
            method: 'get',
        });
    }
}
